package com.iwhalecloud.citybrain.flow.platform.manager.domain.repository;

import com.iwhalecloud.citybrain.flow.platform.manager.domain.model.form.FormProcessInstanceHandleRelDto;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.model.form.FormProcessInstanceHandleRelVo;
import com.iwhalecloud.citybrain.flow.platform.manager.domain.model.form.HttpProcessInstanceHandleRelVo;

import java.util.List;

/**
　　* @description: 流程实例处理
　　* @author shenrm
　　* @date 2021/10/19 16:58
　　*/
public interface FlowProcessInstanceHandleRelRepository {

    /**
     * 新增流程实例阅办人关系信息
     *
     * @param handleRelDtoList
     * @return
     */
    int batchInsertFlowFormProcessInstanceHandleRel(List<FormProcessInstanceHandleRelDto> handleRelDtoList);

    /**
     * 查询数据
     *
     * @param handleRelVo
     * @return
     */
    List<FormProcessInstanceHandleRelVo> selectByCondition(HttpProcessInstanceHandleRelVo handleRelVo);

    /**
     * 根据流程实例ID或流程实例节点ID和处理人ID集合更新处理关系数据信息列表状态为已读
     *
     * @param readCopyTo
     * @param taskIds
     * @param processInstanceIds
     * @param readStatus
     */
    void updateByExampleSelective(String readCopyTo, List<String> taskIds, List<String> processInstanceIds, int readStatus);

    /**
     * 检查数据的存在性
     *
     * @param readCopyTos
     * @param processInstanceIds
     * @param taskIds
     * @return
     */
    boolean isExistCheckData(List<String> readCopyTos, List<String> processInstanceIds, List<String> taskIds);


    /**
     * 查询数据
     *
     * @param processInstanceId
     * @param taskId
     * @return
     */
    List<FormProcessInstanceHandleRelVo> selectByConditionNoPage(String processInstanceId, String taskId);

    /**
     * 清除阅办信息
     *
     * @param processInstanceId
     * @param nodeCode
     * @return
     */
    void deleteInfo(String processInstanceId, String nodeCode);
}
